package com.atguigu.eduorder.client;

import com.atguigu.commonutils.ordervo.CourseWebVoOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author shkstart
 * @create 2022-08-08 23:35
 */
//@FeignClient("service-vod")不用熔断机制的写法
//不需要实现类，此接口远程调用：/eduvod/video/removeAiyVideo/{id}..fallback兜底，出错时执行
@FeignClient("service-edu")//用于指定从哪个服务(删除视频的服务)中调用功能 ，名称与被调用的服务名保持一致
@Component//防止在其他位置注入CodClient时idea报错
public interface EduClient {
    //根据课程id查询课程信息
    @GetMapping("/eduservice/coursefron/getCourseInfoOrder/{id}")
    public CourseWebVoOrder courseWebVoOrder(@PathVariable("id") String id);
}
